package com.qfjy.homework.xuhuiqianpai;

/**
 * @author: xh
 * @date: 2022/11/10 19:53
 * @version: 1.0
 */

import java.math.BigDecimal;

/**
 * TODO 商场后续新推出的折扣策略：MVP用户  --  七折
 */
public class MVPCustomActualPayment implements Payable {

    @Override
    public BigDecimal payPrice(BigDecimal price) {
        System.out.println("MVP用户打七折");
        price = price.multiply(new BigDecimal(0.7)).setScale(2,BigDecimal.ROUND_HALF_UP);
        return price;
    }
}
